home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************
- *
- * DRAWER.PIF
- *
- **************************************************************/
-
- /*** page selecting mode for select_page() ***/
-
- typedef enum {first, last, next, previous, same} SELECT_MODE ;
-
- /*** init data for drawer constructor ***/
-
- typedef struct
- {
- CICONBLK *icon ;
- char *filename ;
- int handle ;
- Awindow *obj_wi ;
- int obj ;
- int width ;
- int height ;
- Awindow *params_window, *filter_window, *info_window ;
- }
- DRAWER_INIT ;
-
- /*******************************************************************
- */
- Awindow *DRAWER_constructor(DRAWER_INIT *) ;
- /*
- * Constructor of the DRAWER object.
- *
- * INPUT: init values, see above
- *
- * OUTPUT: drawer icon on screen
- *
- * RETURN: errors: NULL or -if successfull- ACS-window pointer,
- * which will be used as handle for the object instance
- *
- *******************************************************************/
-
- /*******************************************************************
- */
- void DRAWER_destructor(Awindow *) ;
-
- /* Destructor of the DRAWER object.
- *
- * INPUT: *window: ACS-window to destruct
- *
- *******************************************************************/
-
- /*******************************************************************
- */
- void draw_page(
- int handle, /* VDI worksatation handle */
- Awindow *window, /* data of affected drawer instance */
- int x, /* x-offset of drawing */
- int y, /* y-offset of drawing */
- int *points, /* 2 clipping points */
- int zoom, /* zooming factor */
- int page /* page number */
- ) ;
- /*
- * OUTPUT: drawing on VDI workstation
- *
- *******************************************************************/
-
- /*******************************************************************
- */
- void select_page(Awindow *wi, SELECT_MODE sm) ;
-
- /* Adjusts the page number to the desired one
- * and draws the corresponding page.
- *
- * INPUT: window: all data of the affected drawer instance
- * sm: SELECT_MODE, see above
- *
- * OUTPUT: d->current_page: updated current page number
- * according sm
- * redrawn drawer window
- * redrawn note systems
- *
- *******************************************************************/
-
- /*******************************************************************
- */
- int page_layouter(
- int handle, /* VDI worksatation handle */
- int width, /* width of pages to fit drawing */
- int height, /* height ... */
- Awindow *window /* instance */
- ) ;
-
- /* Calculates the layout of all pages. The number
- * of pages depends on the current parameters.
- * The layouter only needs to be called when parameters have
- * changed, thus CPU time can be saved (i.e. the layouter
- * should not always be called before drawing).
- *
- * OUTPUT: (d->x_min/d->y_min) and (d->x_max/d->y_max) are border
- * points of the allowed drawing area (allowed by the
- * parameters object).
- * (d->x_min_systems/d->y_min_systems) and
- * (d->x_max_systems/d->y_max_systems) are border
- * points of the drawing area for note systems
- * (without headline, indeces).
- * d->npgs: number of pages layouted
- * d->beats_per_system: beats_per_system
- * d->time_per_system: time per system in [ticks]
- * d->bars_per_system: bars_per_system
- * d->bar_divider: sub-bars per bar
- * d->dx_bars: x-distance between bars
- * d->dy_system: y-distance between different systems
- * d->dy_track: y-distance between different tracks
- * d->dy_line: y-distance between note lines
- * d->dy_note: y-distance between notes
- * d->font_id: ID of GDOS font
- * d->page[0..n]: correctly updated
- *
- * RETURN:
- */
- #define LAYOUT_ERR -1
- #define LAYOUT_GOOD 1
- /*
- *******************************************************************/
-
- /*******************************************************************
- */
- void reset_layout(Awindow *window) ;
-
- /* Calls the "page_layouter" with the screen workstation's
- * maximum possible width and height.
- *
- * INPUT: window: affected drawer instance
- *
- * OUTPUT: see "page_layouter"
- *
- *******************************************************************/
-
- /*******************************************************************
- */
- void redraw(Awindow *wi) ;
-
- /* Causes a new layouting with current parameters
- * and a succeeding redrawing.
- *
- * INPUT: *wi: drawer window instance
- *
- * OUTPUT: - updated drawer object data, see "page_layouter"
- * - redrawn note systems on screen
- *
- *******************************************************************/
-
- /*******************************************************************
- */
- int get_first_page(Awindow *window) ;
- int get_last_page(Awindow *window) ;
- int get_current_page(Awindow *window) ;
-
- /* Access procedures to the drawer object data.
- *
- * INPUT: *wi: drawer window instance with data to be updated
- *
- * RETURN: page number of first/last displayable resp. currently
- * displayed page
- *
- *******************************************************************/
-